import 'package:flutter_screenutil/screenutil.dart';
import 'package:flutter/material.dart';
import 'package:heyangkuaidai/DemonStrateModule/Components/SelectRepayItem.dart';
import 'package:heyangkuaidai/DemonStrateModule/Components/NavigationBar.dart';
import 'package:heyangkuaidai/DemonStrateModule/LoanDetailPage.dart';
class SelectRepayPage extends StatefulWidget {
  @override
  _SelectRepayPageState createState() => _SelectRepayPageState();
}

class _SelectRepayPageState extends State<SelectRepayPage> {
  @override
  Widget build(BuildContext context) {
    ScreenUtil.init(context, width: 375, height: 667, allowFontScaling: true);
    return Scaffold(
      resizeToAvoidBottomInset: false,
      body: Column(
        children: [
          SizedBox(height: MediaQuery.of(context).padding.top,),
          NavigationBar(false,title: "持有借款",),
          Container(
            width: ScreenUtil.screenWidth,
            height: ScreenUtil.screenHeight-ScreenUtil().setWidth(320)-MediaQuery.of(context).padding.top,
            child: ListView.separated(
              // ignore: missing_return
              itemBuilder: (context, itemIndex){
                return InkWell(
                   onTap: (){
                      Navigator.push(
                  context,
                  new MaterialPageRoute(
                    builder: (context) => new LoanDetailPage(),
                  ),
                );
                   },
                   child:  SelectRepayItem(),
                );
                // ignore: missing_return
              },separatorBuilder: (context, itemIndex){
              return Container(height: ScreenUtil().setWidth(20),);
            }, itemCount: 1,
              padding: EdgeInsets.only(top:ScreenUtil().setWidth(20),left: ScreenUtil().setWidth(15),right: ScreenUtil().setWidth(15)),),
          ) ,

        ],
      ),
    );
  }
}
